//
//  SpesificLocationViewController.m
//  Futbol5Final
//
//  Created by Ulises Ocana on 6/5/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "SpesificLocationViewController.h"

@interface SpesificLocationViewController ()
@end

@implementation SpesificLocationViewController

@synthesize picker, countryNames, exchangeRates;
@synthesize resultLabel, dollarText;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{

    
    [super viewDidLoad];
    self.countryNames = [[NSArray alloc] initWithObjects:
                         @"Australia (AUD)", @"China (CNY)", @"France (EUR)",
                         @"Great Britain (GBP)", @"Japan (JPY)", nil];
    
    self.exchangeRates = [[NSArray alloc] 
                          initWithObjects: [NSNumber numberWithFloat:0.9922],
                          [NSNumber numberWithFloat:6.5938], 
                          [NSNumber numberWithFloat:0.7270],
                          [NSNumber numberWithFloat:0.6206], 
                          [NSNumber numberWithFloat:81.57], nil];

}


- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


#pragma mark -

#pragma mark PickerView DataSource

- (NSInteger)numberOfComponentsInPickerView:
(UIPickerView *)pickerView
{
    return 1;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView
numberOfRowsInComponent:(NSInteger)component
{
    return [countryNames count];
}
- (NSString *)pickerView:(UIPickerView *)pickerView
             titleForRow:(NSInteger)row
            forComponent:(NSInteger)component
{
    return [countryNames objectAtIndex:row];
} 


@end
